<div class="mt20">
    <input type="text" ng-model="search_text" class="input-text fl mr5 w400 c-gray" placeholder="成员姓名/手机号" ng-enter="search()">
    <a href="javascript:;" class="btn" data-ng-click="search()">搜索</a>
</div>
<div class="grid-header mt20" style="position: relative; margin-bottom: 10px;">
    <span class="fl f14 lh30 text-indent">成员列表</span>
    <div class="fr btn-group clearfix">
        <a href="javascript:;" class="btn"
            ui-dialog="添加成员"
            ui-dialog-data="user"
            ui-dialog-cache="false"
            ui-dialog-ok="createMember($dialogScope,$data,$dialog)"
            ui-dialog-url="member/dialog/edit.html">添加用户</a>
        <a href="javascript:;" class="btn" ng-click="enableMembers()"
            ng-cloak
            ng-show="checker.selected">批量启用</a>
        <a href="javascript:;" class="btn" ng-click="disableMembers()"
            ng-cloak
            ng-show="checker.selected">批量禁用</a>
        <!--<a href="javascript:;" class="btn btn-yellow"
            ui-dialog="引入ERP用户"
            ui-dialog-data="user"
            ui-dialog-init="getErpUserList()"
            ui-dialog-ok="importErpUser($dialogScope,$data,$dialog)"
            ui-dialog-url="member/dialog/erp.html">引入ERP用户</a>-->
    </div>
    <div class="tab-bottom-line"></div>
</div>
<div id="grid" class="sheet mt10 ng-scope">
    <table width="100%">
        <thead>
        <tr class="thead ta-l">
            <th height="34" width="50">
                <label class="">
                    <input type="checkbox" ui-checkbox="序号" ng-change="checker.checkAll()" ng-model="checker.all">
                </label>
            </th>
            <th style="text-align: center">姓名</th>
            <th style="text-align: center">手机号</th>
            <th style="text-align: center">状态</th>
            <th style="text-align: center">初始密码</th>
            <th style="text-align: center">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="user in memberList">
            <td height="40" style="text-align: left">
                <label class="">
                    <input type="checkbox" ui-checkbox="{{pager.pageSize * ((pager.pageIndex || 1) - 1) + $index + 1}}" ng-change="checker.check()" ng-model="user.checked">
                </label>
            </td>
            <td>{{user.user_name}}</td>
            <td>{{user.mobile_tel}}</td>
            <td>{{user.isdisabled === "0" ? "启用" : "禁用"}}</td>
            <td>{{user.ini_pwd}}</td>
            <td>
                <a href="javascript:;" title="编辑" class="mr5 c-orange"
                    ui-dialog="编辑成员"
                    ui-dialog-data="user"
                    ui-dialog-cache="false"
                    ui-dialog-ok="updateMember($dialogScope,$data,$dialog)"
                    ui-dialog-url="member/dialog/edit.html">编辑</a>
                <a href="javascript:;" title="启用" class="mr5 c-orange" 
                    ng-click="enableMember(user)"
                    ng-if="user.isdisabled === '1'">启用</a>
                <a href="javascript:;" title="启用" class="mr5 c-orange" 
                    ng-click="disableMember(user)"
                    ng-if="user.isdisabled === '0'">禁用</a>
                <a href="javascript:;" title="删除" class="mr5 c-orange"
                    ui-confirm 
                    ui-confirm-title="删除" 
                    ui-confirm-ok="deleteMember(user)"
                    ui-confirm-message="确定删除该成员？">删除</a>
                <a href="javascript:;" title="重置密码" class="mr5 c-orange"
                    ui-dialog="重置密码"
                    ui-dialog-data="user"
                    ui-dialog-ok="resetMemberPassword($dialogScope,$data,$dialog)"
                    ui-dialog-url="member/dialog/pwd.html">重置密码</a>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="no-data border" ng-cloak ng-show="!memberList || !memberList.length"><span>暂无数据</span></div>
</div>
<div ui-pagination
    page-index="pager.pageIndex" 
    page-size="pager.pageSize" 
    total="pager.total"
    changed="pager.changed($pageIndex)"></div>